package com.zim.access.webapi.node;

import com.zim.access.domain.node.Node;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Api(tags = "node", description = "节点接口")
@RestController
@RequestMapping(value = "/node")
public class NodeController {

    @ApiOperation("查询所有节点所有元数据")
    @GetMapping("/metadata")
    @ResponseBody
    public List<Node> queryAllMetadata() {
        return null;
    }

    @ApiOperation("查询指定机器所有元数据")
    @GetMapping("/{id}/metadata")
    @ResponseBody
    public Node queryMetadata(@PathVariable String id) {
        return null;
    }

    @ApiOperation("查询指定机器连接数")
    @GetMapping("/{id}/conNum")
    @ResponseBody
    public int queryMetadataOfConNum(@PathVariable String id) {
        return 1;
    }

    @ApiOperation("查询所有机器连接数")
    @GetMapping("/conNum")
    @ResponseBody
    public Map<String, Integer> queryAllMetadataOfConNum() {
        return null;
    }

    @ApiOperation("查询机器是否健康")
    @GetMapping("/healthcheck")
    @ResponseBody
    public boolean isHealthcheck(String id) {
        return false;
    }
}
